import axios from 'axios';

export const getList = () => {
    return (dispatch:any) => {
        axios.get('/api/list').then(res => {
           dispatch({type:'initlist',list:res.data}) 
        })
    }
}

export const changeNum = (status:string,parentIndex:number,id:number) => {
    return {
        type:'changeNum',
        status,
        parentIndex,
        id
    }
}